#ifndef UTIL_H
#define UTIL_H

#include <map>
#include <string.h>
#include <stdio.h>
#include <string>
#include <sys/time.h>

#include "def.h"

struct classcomp 
{
  bool operator() (const char* lhs, const char* rhs) const
  {
  	return strcmp(lhs, rhs) < 0;
  }
};

bool parse_url_2(char* const url, char* &req_url, std::map<char*,char*, classcomp> &para_map);

bool get_file_name(char *real_name, const char *client_name);

bool parse_file(const char* const file_path, std::map<std::string, std::string> &config_map);

bool set_param(const char* const file_path, std::map<std::string, std::string> &config_map);


#endif
